﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FreedomERP.Models;
using FreedomERP.Models.Bd;

namespace FreedomERP.Services.Bd
{
    /// <summary>
    /// 客户业务层接口类
    /// 作者：姚少鹏
    /// </summary>
    interface IBdCustomerService
    {
       

        /// <summary>
        /// 根据FId获取客户
        /// </summary>
        /// <param name="FId"></param>
        /// <returns></returns>
        BdCustomer getCustomerByFId(string FId);

        /// <summary>
        /// 根据FName获取客户
        /// </summary>
        /// <param name="FName"></param>
        /// <returns></returns>
        BdCustomer getCustomerByFName(string FName);

  

         /// <summary>
        /// 查找客户列表
        /// 作者：陈新杰
        /// </summary>
        /// <param name="param">查询参数</param>
        /// <param name="totalCount">数据库客户总数量，用于分页</param>
        /// <returns></returns>
        List<BdCustomerView> findCustomerList(CustomerParameters param,out int totalCount);

        /// <summary>
        /// 新增或更新客户信息
        /// </summary>
        /// <param name="customer"></param>
        /// <returns>客户的Fid</returns>
        void saveOrUpdateCustomer(BdCustomerView customer,out String FId);


       /// <summary>
       /// 根据客户ID删除客户信息
       /// </summary>
       /// <param name="FID"></param>
       /// <returns></returns>
        void deleteCustomer(String FID);
    }
}
